This invention relates to a method and apparatus for returning a movable element of a machine tool to a machine zero point and, more particularly, to a zero-point control method and apparatus in which a dog and limit switch are not required.
Reference will first be had to FIGS. 1 and 2 to describe, in general terms, a conventional zero-point return operation in a numerically controlled machine tool in which a zero-point return dog DG and deceleration limit switch DLS are required. In this case, as shown in FIG. 1, we will assume that the zero-point return dog DG is provided on the movable element, namely a table TB, of the machine tool, and that the deceleration limit switch DLS is provided in close proximity to the zero point of a stationary portion MC of the machine tool. When the system is placed in the zero-point return mode, the table TB is quick-fed at a speed V.sub.R toward the zero point. At time t.sub.1 (FIG. 2), when the dog DG reaches the vicinity of the zero point and actuates the deceleration limit switch DLS, an X-axis deceleration signal XDL produced by the limit switch goes to logical "1", as shown in FIG. 2. The zero-point return speed is reduced in response to the leading edge of the deceleration limit signal XDL and may follow either the solid or dotted line. In the case of the solid line, the zero-point return speed attains a value of V.sub.L after a predetermined period of time, namely at time t.sub.2, which speed is low enough for the drive motor to be stopped instantaneously. In the case of the dotted line, the zero-point return speed first drops to zero at time t.sub.2 and then is elevated to the speed V.sub.L. Then, in both cases, the table TB is moved toward the zero point at the speed V.sub.L from said point in time t.sub.2. Since the dog DG separates from the deceleration limit switch at time t.sub.3, the limit switch is restored to its original state, so that the deceleration signal XDL reverts to logical "0". When the deceleration limit switch DLS is restored to its original state, the numerical control device considers the very next grid point encountered to be the zero point, whereby the numerical control device stops the table TB at time t.sub.4 (at grid point G.sub.o) to end the zero-point return operation.
FIG. 3 is a circuit block diagram which is useful in describing the conventional zero-point return control method.
When a zero-point return command ZRN is logical "0", a first reversible counter RCN.sub.1 has its content incremented each time command pulse CP arrives from a numerical control device NC through an AND gate AN.sub.1. The output of counter RCN.sub.1 is applied to a digital-to-analog converter DAC which generates a voltage proportional to the value of the count within the counter. The analog voltage, amplified by a power amplifier AMP, rotates a servo motor M to drive a table T through a ball screw BS connected to the rotary shaft of the servo motor. A rotary encoder RE, connected to the shaft of the servo motor M to rotate in unison therewith, generates a feedback pulse FBP each time it rotates by a predetermined amount, as well as a one-revolution pulse PC each time it completes one full revolution. The table positions at which the one-revolution pulse is generated are the grid points referred to above. Thus, the rotary encoder RE serves to sense the amount of motor rotation and generates the feedback pulses FBP as an indication of this amount. The feedback pulses FBP are applied to the down-count terminal of the first reversible counter RCN.sub.1 to decrement its content. When the command pulses CP stop arriving from the numerical control device NC and the number of feedback pulses FBP generated reaches a value equal to the total number of command pulses CP applied to the reversible counter RCN.sub.1, the content of the counter attains a value of zero, thereby stopping the servo motor M. This completes the positioning of the table T.
The command pulses CP generated by the numerical control device NC are also applied to the up-count terminal of a second reversible counter RCN.sub.2 through the AND gate AN.sub.1, whereby the command pulses are counted. A flip-flop FF.sub.3 is in the reset state from the time power is introduced to the circuit until the generation of the first one-revolution pulse PC. During this interval, therefore, the feedback pulses FBP generated by the rotary encoder RE are fed through an AND gate AN.sub.5 to the down-count terminal of the second reversible counter RCN.sub.2 to decrement the content of the counter. When the first one-revolution pulse PC is generated following the introduction of power, however, the content of counter RCN.sub.2 at this time indicates the numerical difference between the number of command pulses CP produced from the introduction of power to the generation of the first one-revolution pulse PC, and the actual amount of movement indicated by the feedback pulses FBP measured from the motor rest position (i.e., the position from which the motor started moving upon the introduction of power) until the generation of the first one-revolution pulse PC. The capacity of the second reversible counter RCN.sub.2 is chosen to agree with the number of feedback pulses FBP generated by the rotary encoder RE during one full revolution thereof. When the reversible counter RCN.sub.2 counts up the command pulses CP and its content reverts to zero, therefore, the commanded position of the table at such time will correspond exactly to a grid point.
Next, when the zero-point return command ZRN goes to logical "1", the command pulses CP (now serving as zero-point return pulses) from the numerical control device NC enter the first and second reversible counters RCN.sub.1 and RCN.sub.2 through the AND gate AN.sub.1 as before, since flip-flops FF.sub.1, FF.sub.2 remain in the initially reset state. This causes the table T to be transported toward the zero point (in the direction of the arrow) through an operation similar to the ordinary positioning operation described above. When the table reaches the vicinity of the zero point and the dog DG provided thereon actuates the deceleration limit switch DLS, the switch generates a deceleration signal XDL (logical "1") which opens AND gate AN.sub.2 and, hence, sets flip-flop FF.sub.1. The deceleration signal XDL concurrently enters the numerical control device NC, which responds by slowing down the pulse rate of the zero-point return pulses. As a result, the table T approaches the zero point at reduced speed. When the dog DG separates from the limit switch DLS, the switch reverts to its original condition, and when the content of the second reversible counter RCN.sub.2 attains a value of zero, and gate an 1 closes, and the output of AND gate AN.sub.4 goes to logical "1", thereby setting flip-flop FF.sub.2 , so that the zero-point return pulses from the NC are no longer applied to the first and second reversible counters RCN.sub.1 and RCN.sub.2. Ultimately, therefore, the commanded position at the time of the zero-point return operation is a grid point, with the table coming to rest after being moved by an amount equivalent to the difference between the commanded pulse number left in reversible counter RCN.sub.1 and the number of feedback pulses. When the table finally comes to rest it will be precisely positioned at a grid point.
If the location of the grid point at which the content of the second reversible counter RCN.sub.2 first becomes zero following the restoration of the deceleration limit switch DLS is taken as the zero point, then the table will always come to rest at said grid point regardless of the time delay of the servo system, enabling a correct zero-point return operation to be performed.
The prior-art control method for effecting the zero-point return operation described above relies upon the dog DG and deceleration limit switch DLS. Mounting the dog and limit switch on the machine tool is a very complicated operation. Also, it should be obvious from the foregoing that the table T will not come to rest exactly at the true zero point if either the deceleration limit switch or zero-point return dog is shifted from the correct position by an amount in excess of one grid pitch. For example, assume that there is a shift in the position at which the zero-point return dog DG is installed so that the deceleration signal XDL goes to logical "0" at time t.sub.3 ', as depicted by the dotted line in FIG. 1. When this occurs, the movable element, namely the table, is stopped at time t.sub.4 ', that is, at the grid point G.sub.1 which is one grid point short of the zero point G.sub.o, and the numerical control device will assume mistakenly that G.sub.1 is the zero point. Furthermore, it may be attempted to correctly install the dog or limit switch in such a manner that the deceleration signal XDL will attain the "0" logic level between the grid points G.sub.o and G.sub.1. However, if this should occur at a position extremely close to either of these grid points, as illustrated by the one-dot-and-dash and two-dot-and-dash lines in FIG. 2, a slight change in the contact between the dog and limit switch, or a change with the passage of time, may shift the position at which the signal XDL goes to logical "0" to a point outside the G.sub.o and G.sub.1 limits. This would again make it impossible to achieve a correct zero-point return. When one considers that the distance between grid points is as small as two millimeters, it may be appreciated that errors in the zero-point return operation are quite common, and that adjusting the positions of the dog and limit switch is a very complex operation. In addition, there are cases where it is desired to shift the zero point to the location of an arbitrary grid point, depending upon the particular machine tool. With the conventional method, this can only be accomplished by changing the position at which the dog or limit switch is mounted. This, too, is a complicated task.